<?php

ini_set('display_errors', 1);
error_reporting(E_ALL);

define('SITE_DOMAIN', $_SERVER['HTTP_HOST']);
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ?
                                  getenv('APPLICATION_ENV') :
                                  'production'));

set_include_path(implode(PATH_SEPARATOR, array(
            realpath(APPLICATION_PATH . '/../library'),
            get_include_path(),
        )));

include_once('_pr.php');
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
header('Content-Type: text/html; charset=utf-8');

$application->bootstrap()
            ->run();
?>